import request from '@/router/axios';
import {downloadExcel} from '@/router/axios';
import {formatCondition} from '@/util/util';
//单条查询
export const queryBizSixteenEightSf = (params) => {
  params.head.transCode = 'queryBizSixteenEightSf';
  return request({
    url: '/biz/sixteen/bizSixteenEightSf/queryBizSixteenEightSf',
    method: 'post',
    data: params
  })
}
//多条列表查询，支持条件查询
export const queryBizSixteenEightSfListPage = (params) => {
  params.head.transCode = 'queryBizSixteenEightSfListPage';
  return request({
    url: '/biz/sixteen/bizSixteenEightSf/queryBizSixteenEightSfListPage',
    method: 'post',
    data: params
  })
}
//新增单条记录
export const saveBizSixteenEightSf = (params) => {
  params.head.transCode = 'saveBizSixteenEightSf';
  return request({
    url: '/biz/sixteen/bizSixteenEightSf/saveBizSixteenEightSf',
    method: 'post',
    data: params
  })
}
//新增多条记录
export const saveBizSixteenEightSfList = (params) => {
  params.head.transCode = 'saveBizSixteenEightSfList';
  return request({
    url: '/biz/sixteen/bizSixteenEightSf/saveBizSixteenEightSfList',
    method: 'post',
    data: params
  })
}
//新增或修改单条记录
export const saveOrUpdateBizSixteenEightSf = (params) => {
  params.head.transCode = 'saveOrUpdateBizSixteenEightSf';
  return request({
    url: '/biz/sixteen/bizSixteenEightSf/saveOrUpdateBizSixteenEightSf',
    method: 'post',
    data: params
  })
}


//新增或修改单条记录
export const saveOrUpdateBizSixteenEightSfList = (params) => {
  params.head.transCode = 'saveOrUpdateBizSixteenEightSfList';
  return request({
    url: '/biz/sixteen/bizSixteenEightSf/saveOrUpdateBizSixteenEightSfList',
    method: 'post',
    data: params
  })
}

//修改单条记录
export const updateBizSixteenEightSf = (params) => {
  params.head.transCode = 'updateBizSixteenEightSf';
  return request({
    url: '/biz/sixteen/bizSixteenEightSf/updateBizSixteenEightSf',
    method: 'post',
    data: params
  })
}

//删除单条记录
export const deleteBizSixteenEightSf = (params) => {
  params.head.transCode = 'deleteBizSixteenEightSf';
  return request({
    url: '/biz/sixteen/bizSixteenEightSf/deleteBizSixteenEightSf',
    method: 'post',
    data: params
  })
}

//删除多条记录
export const deleteBizSixteenEightSfList = (params) => {
  params.head.transCode = 'deleteBizSixteenEightSfList';
  return request({
    url: '/biz/sixteen/bizSixteenEightSf/deleteBizSixteenEightSfList',
    method: 'post',
    data: params
  })
}
//导出excel
export const exportBizSixteenEightSfExcel = (params) => {
  downloadExcel({
    url: '/biz/sixteen/bizSixteenEightSf/excelDownload/exportBizSixteenEightSfExcel',
    method: 'get',
    data: 
    {
      tenantId: params.head.tenantId,
      orders:'',
      condition: formatCondition(params.body.sqlCondition)
    }
  })
}
